package oo_day02.Test;

public class Animal {
    //成员变量
    String name;
    int age;
    String color;

    //构造方法
    Animal(String name,int age,String color){
        this.name = name;
        this.age = age;
        this.color = color;
    }
    void drink(){
        System.out.println("我叫:"+name+",已经"+age+"岁了,是"+color+"颜色的动物,正在喝水...");
    }
    void eat(){
        System.out.println("我叫:"+name+",已经"+age+"岁了,是:"+color+"颜色的动物,正在吃饭...");
    }
}
